package admin.shell.commands;

import admin.ui.ProxyMediator;

public class StopCommand extends ShellCommand {

	@Override
	public void execute(ProxyMediator proxy, String[] parameters) {
		if (parameters.length != 2) {
			System.out.println("Usage: stop <plugin>");
			return;
		}
		
		String pluginName = parameters[1];
			
		if (proxy.stopPlugin(pluginName)) {
			System.out.println("Plugin stopped.");
		} else {
			System.out.println("Error: Plugin shutdown failed!");
		}
	}
}
